//
// Created by liushuai on 2021/2/22.
//

#include "detectCapitalUse.h"
bool detectCapitalUse(string word){
    if(word.empty())
        return false;
    int count = 0;
    for(auto e:word){
        if(e>='A' && e<='Z')
            ++count;
    }
    if(count==word.size()||((count==1)&&(word[0]>='A'&&word[0]<='Z'))||(count==0))
        return true;
    else
        return false;
}